<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>20302120102-康明宇</title>
    <link rel="stylesheet" href="CSS/qrdd.css">
</head>
<body>
    <div id="head">
        <span><a href="xxym.html">《</a></span><h1>确认订单</h1>
    </div>

    <div id="shrxx">
        <div>
            <span class="shr">收货人</span><p class="shrxx">康明宇 176****4162</p>
            <span class="psdz">配送至</span><p>辽宁大连市甘井子区凌水街道大连东软信息学院二期公寓菜鸟速递</p>
        </div>
    </div>

    <div id="spxx">
        <h4><span>JD</span> 京东自营</h4>
        <img src="image/xxym/sptp1.jpg" alt="">
        <div>
            <p>志高（CHIGO）取暖器电暖器电暖气 办公...</p><span>￥49.00</span>
            <p class="spgg">不记重量，【广角送风】暖风机 镇店爆款</p>
            <span>
                <div id="box">
                    <input id="num" name="num" type="text" size="3" value=1 disabled>
                    <button id="add">+</button>
                    <button id="minus">-</button>
                </div>
            </span>
        </div>
        <p class="ps"><span>配送</span>预计六天后24:00前送达 > </p>
    </div>
    
    <div id="yh">
        <p><span class="span1">红包</span>共￥0.12，可用<span class="span2">￥0.12</span><input name="yhxz" value="male" id="yhxz" type="radio"></p>
        <p><span>优惠券</span>无可用</p>
    </div>

    <div id="zffs">
        <p><img src="image/ddym/wxzf.png" alt=""><span>微信支付</span><input name="zffs" value="zffs" id="yhxz" type="radio"></p>
        <p><img src="image/ddym/jdbt.png" alt=""><span>京东白条</span><input name="zffs" value="zffs" id="yhxz" type="radio"></p>
        <p><img src="image/ddym/jdzf.png" alt=""><span>京东支付</span><input name="zffs" value="zffs" id="yhxz" type="radio"></p>
    </div>

    <div id="fp">
        <p><span>发票</span>电子发票（商品明细-个人）></p>
    </div>

    <div id="foot">
        <p><span>总计:</span>￥<span id="jg">48.88</span>免运费<span class="zffs"><a href="#">微信支付</a></span></p>
    </div>

    <script>
		var btn1 = document.querySelector("#add");//加按钮
		var btn2 = document.querySelector("#minus");//减按钮
		var num = document.querySelector("#num");//文本输入框

        var jg = document.getElementById("jg");//价格
		btn1.onclick = function (){
			var count = num.value;
			if(count==1)btn2.removeAttribute("disabled");
			//删除disabled属性
			count++
			num.value = count;
            jg.innerHTML = count*49;
		}
		btn2.onclick = function () {//减的事件相应处理
			var count = num.value
			if (count == 1)
				btn2.disabled = "true";
				//不能减到0以下，0以下按钮不能再按
			else {
				count--;
				num.value = count;
                jg.innerHTML = count*49;
			}

		}
	</script>
</body>
</html>